<?php

namespace Wonfu\Core;

use DI\Container;
use DI\ContainerBuilder;

class DIContainer
{

    public $useAnnotations = false;

    public function build(string $config): Container
    {
        $containerBuilder = new ContainerBuilder;
        $containerBuilder->addDefinitions($config);
        $containerBuilder->useAnnotations($this->useAnnotations);
        return $containerBuilder->build();
    }
}
